package com.feihong.txgw.inter.contract.kaika;

import com.feihong.txgw.json.kaika.KaiKaSubmitOrder;
import com.feihong.txgw.ui.mvp.model.IBaseModel;
import com.feihong.txgw.ui.mvp.precenter.AbBasePrecenter;
import com.feihong.txgw.ui.mvp.view.IBaseActivity;

import java.util.HashMap;

import io.reactivex.Observable;
import okhttp3.MultipartBody;

/**
 * @Author wangziheng
 * @ProjectName txgw_app
 * @ClassName IKaikaSubmitContract
 * @package com.feihong.txgw.inter.contract.kaika
 * @data 2018/5/4 16:43
 * @Describe
 * @Change
 */
public interface IKaikaSubmitContract {
    interface IKaikaSubmitMainView extends IBaseActivity{

        void submitNormalOrderResult(KaiKaSubmitOrder result);

        void submitNormalOrderError();

        void submitYuyueOrderResult(String result);

        void submitYuyueOrderError();

        void kaikaAuthIDCardResult(String result);

        void kaikaAuthIDCardError();

        void kaikaUploadIDCardImgResult(String result);

    }

    interface IKaikaSubmitMainModel extends IBaseModel{
        Observable<String> submitNormaoOrder(HashMap<String,String> mParams);

        Observable<String> kaikaAuthResult(String json);

        Observable<String> submitYuyueOrder(HashMap<String,String> mParams);

        Observable<String> kaikaUploadIDCardImg(MultipartBody.Part file);
    }

    abstract class AbKaikaSubmitMainPrecenter extends AbBasePrecenter<IKaikaSubmitMainModel,IKaikaSubmitMainView>{

        /**
         * 提交正常开卡订单
         * @param mParams
         */
        public abstract void submitNormalOrder(HashMap<String, String> mParams);

        /**
         * 身份证实名认证
         * @param json
         */
        public abstract void kaikaAuthResult(String json);

        /**
         * 提交预支付订单
         * @param mParams
         */
        public abstract void submitYuyueOrder(HashMap<String,String> mParams);

        /**
         * 上传身份证正反面
         * @param file
         */
        public abstract void kaikaUploadIDCardImg(MultipartBody.Part file);
    }
}
